Recording media recording digital data such as music content and video data are available in various types including magnetic disk, optical disk, and magneto-optical disk. A semiconductor memory card which is one of such recording media mainly uses a nonvolatile semiconductor memory such as flash ROM as storage device, and can be reduced in the size of recording medium, and it is widely used in digital still camera, mobile telephone terminal, and other small portable appliances.
Data stored in the semiconductor memory card is managed by a file system by which users can easily handle the stored data as a file. File systems known hitherto include FAT file system (see non-patent document 1), UDF file system (Universal Disk Format) (see non-patent document 2), and NTFS file system (New Technology File System). Data stored in the semiconductor memory card with data managed by such file systems can be shared with devices which interpret the same file system and exchanged with such devices.
As an example of conventional file systems, FAT file system is explained. In the FAT file system, a management information area exists at the beginning of logical address space used by an accessing apparatus for accessing the semiconductor memory card.
The management information area stores information necessary for file management in a file system such as area assignment unit and size of area managed by the file system. More specifically, the management information area stores file system management information necessary for managing the file data (user data), such as FAT and root directory.
The FAT is an area for storing the information about physical storage position of data contained in the file. Usually the FAT is duplicated so that two FATs having the same information are present in the semiconductor memory card. Thus even if one FAT is broken, the file can be accessed with the other FAT. The root directory entry is an area for storing information (directory entry) of file and directory existing immediately beneath the root directory.
In the FAT file system, there is a data area for storing file entity data (called “file data”) in an area following the management information area. The data area is divided to and managed in plural clusters.
Usually, file data is stored in plural clusters. Linkage among clusters is managed by link information stored in the FAT. Information (directory entry) of file and directory existing immediately beneath the root directory is stored in part of the data area.
In the FAT file system, file data is stored, and the directory entry and FAT are rewritten in order to update the information about the storage position and size of file data.
Specifically, in the FAT system, when recording the file data, three pieces of management information (file system management information) relating to the file data, directory entry, and FAT must be written to the semiconductor memory card. Since the file data is managed in the cluster unit of a relatively large size, the writing size to the semiconductor memory card is relatively large, about tens of kB. By contrast, since the file system management information of directory entry and FAT is small in size of data to be updated, it can be written to the semiconductor memory card in a relatively small unit of, for example, 512 bytes. Hence, the size is largely different between the file data and the file system management information such as FAT.
On the other hand, a flash memory generally used as storage device of the semiconductor memory card has characteristic in that it cannot overwrite data after the data is once erased in erase block unit of a specific size. If the cluster size is smaller than the erase block size, the writing speed is lowered when data is written in the cluster unit.
To solve such problems, conventionally, it has been proposed to prevent drop of writing speed by searching consecutive free spaces on the FAT, and writing data to the searched consecutive clusters. According to this method, if the cluster size is smaller than the erase block size, data can be written at high speed (see, for example, patent document 1).                Patent document 1: JP 2002-91806 A        Non-patent document 1: ISO/IEC9293, “Information Technology—Volume and file structure of disk cartridges for information”, 1994.        Non-patent document 2: OSTA Universal Disk Format Specification Revision 1.50, 1997.        